

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>
	    会议
    </title>
    <link rel="stylesheet" href="/css/callCenter/style.css" type="text/css" />
    <style>
    .HeaderStyle {
	    background-color: #A6BDDF;
	    font-weight: bold;
	    color: #0066CC;
	    text-align: center;
	    text-decoration: none;
    }
    .ItemStyle {
	    background-color: #FFFFFE;
    }
    .AlternatingItemStyle {
	    background-color: #ECEBEB;
    }
    </style>
    <script type="text/javascript" language="javascript" src="/js/callCenter/shareJs.js"></script>
    <script type="text/javascript" language="javascript">
      var strCallees = "",strCalledNOs="";
		function funSave()
		{
		    var strCaller = document.all.txtCaller.value.Trim();
		    if (strCaller.length==0)
		    {
		        alert('请选择要转接到的号码。');
		        document.all.txtCaller.select();
                document.all.txtCaller.focus();
		        return;
		    }
		    
		    window.returnValue=strCaller;
		    window.close();
		}
		
		function frm_Load()
		{
		    if (!window.opener){window.opener=null;window.close(); return;}
		    document.all.txtJuXiang.value="1";
		    try
		    {
		        strCallees = window.opener.strConfNOs;
		        strCalledNOs="," + strCallees + ",";
		        document.all.txtXSCaller.value=window.opener.strFJH;
		        addToList();
		    }
		    catch(e){}
		}
		
		function addToList(Callees)
		{
		    var objTdList = document.getElementById("tdList");
		    if (!objTdList) return;
            try{
               var n = window.opener.funConfAdd(parseInt(document.all.txtJuXiang.value.Trim()),document.all.txtXSCaller.value.Trim(),strCallees);
               blCanAdd = (n===1);
            }catch(e)
            {alert('异常错误，请重试。');}
		            
		    var strHTML = "<table cellspacing=\"0\" rules=\"all\" border=\"1\" \style=\"border-width:1px;border-style:Solid;width:100%;border-collapse:collapse;\" align=\"center\"> \n" +
		        "   <tr class='HeaderStyle'> \n" +
		        "       <td align='center'>与会号码</td> \n" + 
		        "   </tr>\n";
		    var nIndex = 1;
		    var arr = Callees.split(',');
		    var blCanAdd = true;
		    for(var i=0;i<arr.length;i++)
		    {
		        if (arr[i].Trim()=='' || !isNumber(arr[i].Trim())) continue;
		        blCanAdd = true;
		        if (strCalledNOs.indexOf("," + arr[i].Trim() + ",")<0)
		        {
		            strCalledNOs += arr[i].Trim() + ",";		           
		        }
		        if (!blCanAdd) continue;
		        strHTML += "   <tr class='" + (nIndex%2==0?"AlternatingItemStyle":"ItemStyle") + "'> \n" +
		            "       <td align='center' style='cursor:hand' ondblclick=\"javascript:funSetHook('" + arr[i].Trim() + "');\">" + arr[i].Trim() + "</td> \n" + 
		            "   </tr>\n";
		            
		        nIndex++;
		        if (nIndex>=7) break;    
		    }
		    for(var i=nIndex;i<7;i++)
		    {
		        strHTML += "   <tr class='" + (i%2==0?"AlternatingItemStyle":"ItemStyle") + "'> \n" +
		            "       <td align='center'>&nbsp;</td> \n" + 
		            "   </tr>\n";
		    }
		    strHTML += "</table>";
		    objTdList.innerHTML = strHTML;    
		}
		
		function funSetHook(vStrCallee)
		{
		    try
		    {
		         var n = window.opener.funSetHook(vStrCallee);
		         if (n != 1)
		         {
		            alert('挂断电话失败，请重试。');
		            return;
		         }
		         strCalledNOs = strCalledNOs.replace("," + vStrCallee + ",",",");
		    }
		    catch(e){alert('异常错误，请重试。');}
		}
		
		function funAddToList()
		{
		    if (document.all.txtJuXiang.value.Trim().length==0 || !isNumber(document.all.txtJuXiang.value.Trim()))
		    {
		        alert('您输入的局向无效无效，请查证。');document.all.txtJuXiang.select();document.all.txtJuXiang.focus();
		    }
		    if (document.all.txtXSCaller.value.Trim().length==0 || !isNumber(document.all.txtXSCaller.value.Trim()))
		    {
		        alert('您输入的显示号码无效，请查证。');document.all.txtXSCaller.select();document.all.txtXSCaller.focus();
		    }
		    var str = getValuable(document.all.txtNOs.value);
		    if (str.length==0)
		    {
		        alert('请输入要添加的号码。');
		        document.all.txtNOs.select();
		        document.all.txtNOs.focus();
		        return;
		    }
		    document.all.txtNOs.value = "";
		    // strCallees += "," + str;
                strCallees = str;
		    addToList("," + str);
		}
		
	</script>
</head>
<body style="margin:0px">
<div>
</div>

    <table cellspacing="0" cellpadding="0" width="100%" border="0" align="center">
        <tr style="background-color:#ff0000">
            <td background="images/titleBg.jpg">
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                        <td height="8"></td>
                    </tr>
                    <tr>
                        <td><b><font color="#127BC4">&nbsp;&nbsp;电话会议</font></b></td>
                    </tr>
                 </table>
            </td>
        </tr>
        <tr bgcolor="#6D6D6D">
            <td colspan="4">
                <table width="100%" border="0" cellspacing="1" cellpadding="6">
                    <tr>
                        <td bgcolor="#F3F9FF" valign="top">
                            <table style="font-size:9pt" cellspacing="0" cellpadding="1" rules="rows" width="100%" border="0">
                                <tr>
                                    <td colspan="2">局向：<input name="txtJuXiang" type="text" maxlength="2" id="txtJuXiang" class="txtbox" style="width:30px;" />
                                        &nbsp;&nbsp;显示号码：<input name="txtXSCaller" type="text" maxlength="15" id="txtXSCaller" class="txtbox" style="width:80px;" />&nbsp;(主叫)
                                    </td>
                                </tr>
                                <tr>
                                    <td id="tdBlack" colspan="2" style="font-size:12px; display:none">黑名单：</td>
                                </tr>
                                <tr>
                                    <td style="width:150px" id="tdList" rowspan="2"></td>
                                    <td style="width:160px" align="center"><textarea name="txtNOs" rows="2" cols="20" id="txtNOs" style="height:90px;width:160px;"></textarea>
                                    <br /><font color="red">*注：电话号码之间使用“,”(逗号)分隔且不能换行</font>
                                    </td>
                                </tr>
                                <tr>
                                    <td align="center"><input type="button" id="btnAdd" value="邀请" onclick="javascript:funAddToList();" />&nbsp;<input type="button" id="btnClose" value="关闭" onclick="javascript:window.opener=null;window.close();" /></td>
                                </tr>
                            </table>
                        </td>
                    </tr>
               </table>             
            </td>
        </tr>
    </table>    
    
<div>
</div>